﻿using Bilibili.Model.Live;
using ReactiveUI;
using System.Collections.ObjectModel;

namespace Avalonia.BiliBili.ViewModels
{
    public sealed class LiveCenterViewModel : ViewModelBase
    {
        private ObservableCollection<LiveMedalModel> medals = [];
        public ObservableCollection<LiveMedalModel> Medals
        {
            get => medals;
            private set => this.RaiseAndSetIfChanged(ref medals, value);
        }
        private ObservableCollection<LiveTitleModel> titles = [];
        public ObservableCollection<LiveTitleModel> Titles
        {
            get => titles;
            private set => this.RaiseAndSetIfChanged(ref titles, value);
        }
        private LiveUserInfoModel userInfo;
        public LiveUserInfoModel UserInfo
        {
            get => userInfo;
            set => this.RaiseAndSetIfChanged(ref userInfo, value);
        }
        public override void Dispose()
        {
            base.Dispose();
            titles?.Clear();
            medals?.Clear();
        }
    }
}